#include "Paper.h"

// STATE MACHINE DEFINITION
#define PRINTING 1
#define ROBOT_FORWARD 2
#define ROBOT_BACKWARD 3

#define ROBOT_STATE1 0
#define ROBOT_STATE2 1
#define ROBOT_STATE3 2
#define ROBOT_STATE4 3

// Animation Properties
#define SCENE_SPEED_MS 10
#define N_PAPERS 4

// Guillotine Specifics
#define GUILLOTINE_SPEED (SCENE_SPEED_MS*2)

// ROBOT
#define ROBOT_MAX_STATE 5


// State Machine
extern int currentState;

extern int count;
extern int robotSteps;
extern int robotState_index;
extern float robotTrajectory[ROBOT_MAX_STATE][3];
extern float robot_delta[ROBOT_MAX_STATE-1][3];
extern float robot_posx, robot_posz;

void animatePrinter(float obj_rotate);
void animateGuillotine(float guillotineStepY);
void animateRobot();

void animateCompressor();
void animateRobot();
void initRobotDeltas();

void handlePaper(Paper &paper, int curState, int it);
void printPaper(Paper &paper, int i);